package com.wpq.game_company.service.impl;

import com.wpq.game_company.domain.Game;
import com.wpq.game_company.mapper.GameMapper;
import com.wpq.game_company.service.IGameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service//创建gameServiceImpl对象
public class GameServiceImpl implements IGameService {

    //注入
    @Autowired
    private GameMapper mapper;

    @Override
    public Integer insert(Game game) {
        return mapper.insert(game);
    }

    @Override
    public List<Game> selectAll() {
        return mapper.selectAll();
    }

    @Override
    public Integer delete(int id) {
        return mapper.delete(id);
    }

    @Override
    public Integer updata(Game game) {
        return mapper.updata(game);
    }

    @Override
    public Game findgameByid(int id) {
        return mapper.findgameByid(id);
    }

    @Override
    public List<Game> searchAccording(String type) {
        return mapper.searchAcc(type);
    }
}
